﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Admin.Core.Service.sys.Permission.Dto/PermissionAssignDto 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       PermissionAssignDto
* 创建时间：  2025/6/4 11:13:13
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using SSPivot.AspNetCore.Abstractions.User;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Admin.Core.Service.sys.Permission.Dto
{
    public class PermissionAssignDto
    {
        [Required(ErrorMessage = "角色不能为空")]
        public long RoleId { get; set; }

        [Required(ErrorMessage = "权限不能为空")]
        public List<long> PermissionIds { get; set; }
    }
    public class PermissionSaveTenantPermissionsDto
    {
        [Required(ErrorMessage = "租户不能为空")]
        public long TenantId { get; set; }

        [Required(ErrorMessage = "权限不能为空")]
        public List<long> PermissionIds { get; set; }
    }

    /// <summary>
    /// 设置数据范围
    /// </summary>
    public class RoleSetDataScopeDto
    {
        /// <summary>
        /// 角色Id
        /// </summary>
        [Required]
        public long RoleId { get; set; }

        /// <summary>
        /// 数据范围
        /// </summary>
        public DataScope DataScope { get; set; }

        /// <summary>
        /// 指定部门
        /// </summary>
        public long[] OrgIds { get; set; }
    }
}
